<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面试题</title>
</head>

<body>
    <!-- 函数先提升，变量后提升 -->
    <script>
        // 测试题1：
        function a() {}
        var a;
        console.log(typeof a);


        // 测试题2：
        if (!(b in window)) {
            var b = 1;
        }
        console.log(b);
    </script>
</body>

</html>